
/**
 * Record pre-insert trigger.
 * Validate the record to be inserted.
 * When false is returned the record will not be inserted in the database.
 * When an exception is thrown the record will also not be inserted in the database but it will be added to databaseManager.getFailedRecords(),
 * the thrown exception can be retrieved via record.exception.getValue().
 *
 * @param {JSRecord<db:/sytek/reservatrf>} record record that will be inserted
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"4C0D4ECC-E143-497E-89B7-776096D2B0F9"}
 */
function onRecordInsert(record) {
	record.rf_lugar_desde = record.reservatrf_to_trasladodh.trasdh_tari_desde
	record.rf_lugar_hasta = record.reservatrf_to_trasladodh.trasdh_tari_hasta
	record.rf_medio_traslado = record.reservatrf_to_trasladodh.trasdh_tari_medio
	record.rf_idavuelta = record.reservatrf_to_trasladodh.trasdh_tari_idavue
	return true
}
